﻿@model YCMS.Models.DockListViewModel

@{
    ViewBag.Title = "Edit";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> 
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<h2>Edit</h2>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Dock</legend>
        @Html.HiddenFor(model => model.dock.ID)
        @Html.HiddenFor(model => model.pageNumber)
        @Html.HiddenFor(model => model.sortOrder)
        <div class="editor-label">
            @Html.LabelFor(model => model.dock.DockName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.dock.DockName)
            @Html.ValidationMessageFor(model => model.dock.DockName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.dock.DockArea)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.dock.DockArea)
            @Html.ValidationMessageFor(model => model.dock.DockArea)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.dock.MaxLength)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.dock.MaxLength)
            @Html.ValidationMessageFor(model => model.dock.MaxLength)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.dock.MaxBeam)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.dock.MaxBeam)
            @Html.ValidationMessageFor(model => model.dock.MaxBeam)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.dock.Vacant)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.dock.Vacant)
            @Html.ValidationMessageFor(model => model.dock.Vacant)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.dock.Members)
        </div>
        <div class="editor-field">
            @Html.ListBox("SelectedMembers", (MultiSelectList)Model.AllMembers)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back", "List", new {SortOrder=Model.sortOrder, page=Model.pageNumber})
</div>